home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-2.iso / Files II / Hyper / S / ShortStack.sit / ShortStack / cards.xml < prev    next >
Encoding:
Text File  |  1994-10-07  |  14.4 KB  |  345 lines

  1. card_4857.xml
  2. <?xml version="1.0" encoding="utf-8" ?>
  3. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  4. <card>
  5.     <id>4857</id>
  6.     <filler1>0</filler1>
  7.     <bitmap>BMAP_5119.pbm</bitmap>
  8.     <cantDelete> <false /> </cantDelete>
  9.     <showPict> <true /> </showPict>
  10.     <dontSearch> <false /> </dontSearch>
  11.     <owner>3650</owner>
  12.     <link rel="stylesheet" type="text/css" href="stylesheet_3324.css" />
  13.     <part>
  14.         <id>4</id>
  15.         <type>field</type>
  16.         <visible> <true /> </visible>
  17.         <dontWrap> <false /> </dontWrap>
  18.         <dontSearch> <false /> </dontSearch>
  19.         <sharedText> <false /> </sharedText>
  20.         <fixedLineHeight> <false /> </fixedLineHeight>
  21.         <autoTab> <false /> </autoTab>
  22.         <lockText> <true /> </lockText>
  23.         <rect>
  24.             <left>52</left>
  25.             <top>61</top>
  26.             <right>455</right>
  27.             <bottom>241</bottom>
  28.         </rect>
  29.         <style>scrolling</style>
  30.         <autoSelect> <false /> </autoSelect>
  31.         <showLines> <false /> </showLines>
  32.         <wideMargins> <false /> </wideMargins>
  33.         <multipleLines> <false /> </multipleLines>
  34.         <reservedFamily> 0 </reservedFamily>
  35.         <titleWidth>0</titleWidth>
  36.         <icon>0</icon>
  37.         <textAlign>left</textAlign>
  38.         <font>Geneva</font>
  39.         <textSize>12</textSize>
  40.         <textStyle>plain</textStyle>
  41.         <textHeight>16</textHeight>
  42.         <name>Explanation</name>
  43.         <script></script>
  44.     </part>
  45.     <part>
  46.         <id>5</id>
  47.         <type>button</type>
  48.         <visible> <true /> </visible>
  49.         <reserved5> 0 </reserved5>
  50.         <reserved4> 0 </reserved4>
  51.         <reserved3> 0 </reserved3>
  52.         <reserved2> 0 </reserved2>
  53.         <reserved1> 0 </reserved1>
  54.         <enabled> <true /> </enabled>
  55.         <rect>
  56.             <left>111</left>
  57.             <top>262</top>
  58.             <right>211</right>
  59.             <bottom>284</bottom>
  60.         </rect>
  61.         <style>roundrect</style>
  62.         <showName> <true /> </showName>
  63.         <highlight> <false /> </highlight>
  64.         <autoHighlight> <true /> </autoHighlight>
  65.         <sharedHighlight> <true /> </sharedHighlight>
  66.         <family>0</family>
  67.         <titleWidth>0</titleWidth>
  68.         <icon>0</icon>
  69.         <textAlign>center</textAlign>
  70.         <font>Chicago</font>
  71.         <textSize>12</textSize>
  72.         <textStyle>plain</textStyle>
  73.         <name>Next Card</name>
  74.         <script>on mouseUpgo to card id 2671end mouseUp</script>
  75.     </part>
  76.     <part>
  77.         <id>6</id>
  78.         <type>button</type>
  79.         <visible> <true /> </visible>
  80.         <reserved5> 0 </reserved5>
  81.         <reserved4> 0 </reserved4>
  82.         <reserved3> 0 </reserved3>
  83.         <reserved2> 0 </reserved2>
  84.         <reserved1> 0 </reserved1>
  85.         <enabled> <true /> </enabled>
  86.         <rect>
  87.             <left>266</left>
  88.             <top>263</top>
  89.             <right>366</right>
  90.             <bottom>285</bottom>
  91.         </rect>
  92.         <style>roundrect</style>
  93.         <showName> <true /> </showName>
  94.         <highlight> <false /> </highlight>
  95.         <autoHighlight> <true /> </autoHighlight>
  96.         <sharedHighlight> <true /> </sharedHighlight>
  97.         <family>0</family>
  98.         <titleWidth>0</titleWidth>
  99.         <icon>0</icon>
  100.         <textAlign>center</textAlign>
  101.         <font>Chicago</font>
  102.         <textSize>12</textSize>
  103.         <textStyle>plain</textStyle>
  104.         <name>Look at Data</name>
  105.         <script>on mouseUpgo to card id 3931end mouseUp</script>
  106.     </part>
  107.     <content>
  108.         <layer>card</layer>
  109.         <id>4</id>
  110.         <text><span class="style2">ather than have a separate card for each possible set of data to be displayed, it is more efficient (not to mention ELEGANT) HyperCard scripting to use a single card to hold all the data and then build each individual "card" on-the-fly, or, in other words: virtual cards!In this way, ShortStack contains only three cards, but gives the impression of containing as many as 18 cards.Go to the next card and click on the "Answer" button.  Each time you click, instead of bringing up another card with the same background and card fields, you see different data supplied for the field.  The same effect could be achieved by having a different card for each answer, but this method uses much less overhead and makes it much easier to add and maintain data (since it's all in one spot, there's only one card to edit).The answers (the data) are all contained on a single card, Card Three of this stack.  Click on the "Look at Data" button to go to this card.  Notice that commas separate the line number from the line data.The script that does the building of the on-the-fly "card" is in the "Answer" button.  Check it out!  (Choose the Button Tool, double click on the "Answer" button and click on "script.")There are five variations, which should give you plenty of food for thought.Although all the examples use only one or two lines from the Data Card, many different elements can be used to build up a more complicated virtual card.Best of luck!</span><span class="style4">This stack is freeware:  free to use, free to share (but also free of all liability for the author!).  Compliments, however, are always welcome and may be directed to:Stuart Kohler, <skohler@aol.com>(And a tip-of-the-hat to Ken Dufort who is virtually responsible for this stack!)</span></text>
  111.     </content>
  112.     <name></name>
  113.     <script>on closeCardset the scroll of card field 1 to 1end closeCard</script>
  114. </card>
  115.  
  116.  
  117. card_2671.xml
  118. <?xml version="1.0" encoding="utf-8" ?>
  119. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  120. <card>
  121.     <id>2671</id>
  122.     <filler1>0</filler1>
  123.     <bitmap>BMAP_3071.pbm</bitmap>
  124.     <cantDelete> <false /> </cantDelete>
  125.     <showPict> <true /> </showPict>
  126.     <dontSearch> <false /> </dontSearch>
  127.     <owner>3650</owner>
  128.     <link rel="stylesheet" type="text/css" href="stylesheet_3324.css" />
  129.     <part>
  130.         <id>1</id>
  131.         <type>button</type>
  132.         <visible> <true /> </visible>
  133.         <reserved5> 0 </reserved5>
  134.         <reserved4> 0 </reserved4>
  135.         <reserved3> 0 </reserved3>
  136.         <reserved2> 0 </reserved2>
  137.         <reserved1> 0 </reserved1>
  138.         <enabled> <true /> </enabled>
  139.         <rect>
  140.             <left>205</left>
  141.             <top>155</top>
  142.             <right>305</right>
  143.             <bottom>177</bottom>
  144.         </rect>
  145.         <style>roundrect</style>
  146.         <showName> <true /> </showName>
  147.         <highlight> <false /> </highlight>
  148.         <autoHighlight> <true /> </autoHighlight>
  149.         <sharedHighlight> <true /> </sharedHighlight>
  150.         <family>0</family>
  151.         <titleWidth>0</titleWidth>
  152.         <icon>0</icon>
  153.         <textAlign>center</textAlign>
  154.         <font>Chicago</font>
  155.         <textSize>12</textSize>
  156.         <textStyle>plain</textStyle>
  157.         <name>Answer</name>
  158.         <script>----------------------------------------------------------------------on mouseUp--get an answer from the Data Card and put it into the card field--put item 2 of line random(15) of card field "Answers" of ¬¨card id 3931 into card field 1end mouseUp------------------------------------------------------------------------fancier version of above - this one keeps track of the last answer--and makes sure the same one does not come up twice in a row.--**NOTE: to try out any of these alternate mouseUp routines, you--  need to remove the number (for example "2" in this case) and--  make sure you only have *one* mouseUp handler in this button.on mouseUp2Global whichOneGlobal lastOneput random(15) into whichOneif lastOne is whichOnethenrepeat until lastOne is not whichOneput random(15) into whichOneend repeatend ifput item 2 of line whichOne of card field "Answers" of¬¨card id 3931 into card field 1put whichOne into lastOneend mouseUp2------------------------------------------------------------------------an even fancier version, in case you need to choose multiple--lines and want to make sure you don't choose the same line twice--for the same card:on mouseUp3put random(15) into randomOneput random(15) into randomTwoif randomTwo is randomOnethenrepeat until randomTwo is not randomOneput random(15) into randomTwoend repeatend ifput item 2 of line randomOne of card field "Answers" of card¬¨id 3931 into card field 1put item 2 of line randomTwo of card field "Answers" of card¬¨id 3931 into card field 2end mouseUp3------------------------------------------------------------------------and a *really* fancy version, for two lines, neither of which--are repeated from the previous card:on mouseUp4Global randomOneGlobal randomTwoGlobal oldOneGlobal oldTwo--put random(15) into randomOneif randomOne is oldOne or randomOne is oldTwothenrepeat until randomOne is not oldOne and randomOne is not oldTwoput random(15) into randomOneend repeatend if--put random(15) into randomTwoif randomTwo is oldTwo or randomTwo is oldOnethenrepeat until randomTwo is not oldTwo and randomTwo is not oldOneput random(15) into randomTwoend repeatend if--if randomTwo is randomOnethenrepeat until randomTwo is not randomOne and randomTwo is not oldTwo¬¨and randomTwo is not oldOneput random(15) into randomTwoend repeatend ifput item 2 of line randomOne of card field "Answers" of card¬¨id 3931 into card field 1put item 2 of line randomTwo of card field "Answers" of card¬¨id 3931 into card field 2put randomOne into oldOneput randomTwo into oldTwoend mouseUp4------------------------------------------------------------------------finally (although interesting permutations don't stop!),--here's a script for creating a random set, with no numbers--repeated.  This version makes a set of 10 numbers picked from--1 to 20.on mouseUp5put random(20) into randomSetput random(20) into randomTemprepeat while the number of items in randomSet < 10if randomTemp is not in randomSetthen put randomTemp & "," & randomSet into randomSetelse put random(20) into randomTempend repeat----if you'd like the resulting set put in ascending order,--remove the two dashes from the following line:sort items of randomSet ascending numeric--put randomSetend mouseUp5------------------------------------------------------------------</script>
  159.     </part>
  160.     <part>
  161.         <id>2</id>
  162.         <type>field</type>
  163.         <visible> <true /> </visible>
  164.         <dontWrap> <false /> </dontWrap>
  165.         <dontSearch> <false /> </dontSearch>
  166.         <sharedText> <false /> </sharedText>
  167.         <fixedLineHeight> <false /> </fixedLineHeight>
  168.         <autoTab> <false /> </autoTab>
  169.         <lockText> <false /> </lockText>
  170.         <rect>
  171.             <left>177</left>
  172.             <top>206</top>
  173.             <right>462</right>
  174.             <bottom>224</bottom>
  175.         </rect>
  176.         <style>transparent</style>
  177.         <autoSelect> <false /> </autoSelect>
  178.         <showLines> <false /> </showLines>
  179.         <wideMargins> <false /> </wideMargins>
  180.         <multipleLines> <false /> </multipleLines>
  181.         <reservedFamily> 0 </reservedFamily>
  182.         <titleWidth>0</titleWidth>
  183.         <icon>0</icon>
  184.         <textAlign>left</textAlign>
  185.         <font>Chicago</font>
  186.         <textSize>12</textSize>
  187.         <textStyle>plain</textStyle>
  188.         <textHeight>16</textHeight>
  189.         <name>Answer</name>
  190.         <script></script>
  191.     </part>
  192.     <part>
  193.         <id>3</id>
  194.         <type>button</type>
  195.         <visible> <true /> </visible>
  196.         <reserved5> 0 </reserved5>
  197.         <reserved4> 0 </reserved4>
  198.         <reserved3> 0 </reserved3>
  199.         <reserved2> 0 </reserved2>
  200.         <reserved1> 0 </reserved1>
  201.         <enabled> <true /> </enabled>
  202.         <rect>
  203.             <left>180</left>
  204.             <top>260</top>
  205.             <right>338</right>
  206.             <bottom>284</bottom>
  207.         </rect>
  208.         <style>roundrect</style>
  209.         <showName> <true /> </showName>
  210.         <highlight> <false /> </highlight>
  211.         <autoHighlight> <true /> </autoHighlight>
  212.         <sharedHighlight> <true /> </sharedHighlight>
  213.         <family>0</family>
  214.         <titleWidth>0</titleWidth>
  215.         <icon>0</icon>
  216.         <textAlign>center</textAlign>
  217.         <font>Chicago</font>
  218.         <textSize>12</textSize>
  219.         <textStyle>plain</textStyle>
  220.         <name>Back to Explanation</name>
  221.         <script>on mouseUpgo to card id 4857end mouseUp</script>
  222.     </part>
  223.     <part>
  224.         <id>6</id>
  225.         <type>field</type>
  226.         <visible> <true /> </visible>
  227.         <dontWrap> <false /> </dontWrap>
  228.         <dontSearch> <false /> </dontSearch>
  229.         <sharedText> <false /> </sharedText>
  230.         <fixedLineHeight> <false /> </fixedLineHeight>
  231.         <autoTab> <false /> </autoTab>
  232.         <lockText> <false /> </lockText>
  233.         <rect>
  234.             <left>177</left>
  235.             <top>227</top>
  236.             <right>462</right>
  237.             <bottom>245</bottom>
  238.         </rect>
  239.         <style>transparent</style>
  240.         <autoSelect> <false /> </autoSelect>
  241.         <showLines> <false /> </showLines>
  242.         <wideMargins> <false /> </wideMargins>
  243.         <multipleLines> <false /> </multipleLines>
  244.         <reservedFamily> 0 </reservedFamily>
  245.         <titleWidth>0</titleWidth>
  246.         <icon>0</icon>
  247.         <textAlign>left</textAlign>
  248.         <font>Chicago</font>
  249.         <textSize>12</textSize>
  250.         <textStyle>plain</textStyle>
  251.         <textHeight>16</textHeight>
  252.         <name></name>
  253.         <script></script>
  254.     </part>
  255.     <name></name>
  256.     <script>on closeCardput empty into card field 1put empty into card field 2end closeCard</script>
  257. </card>
  258.  
  259.  
  260. card_3931.xml
  261. <?xml version="1.0" encoding="utf-8" ?>
  262. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  263. <card>
  264.     <id>3931</id>
  265.     <filler1>0</filler1>
  266.     <bitmap>BMAP_4588.pbm</bitmap>
  267.     <cantDelete> <false /> </cantDelete>
  268.     <showPict> <true /> </showPict>
  269.     <dontSearch> <false /> </dontSearch>
  270.     <owner>3650</owner>
  271.     <link rel="stylesheet" type="text/css" href="stylesheet_3324.css" />
  272.     <part>
  273.         <id>1</id>
  274.         <type>field</type>
  275.         <visible> <true /> </visible>
  276.         <dontWrap> <false /> </dontWrap>
  277.         <dontSearch> <false /> </dontSearch>
  278.         <sharedText> <false /> </sharedText>
  279.         <fixedLineHeight> <true /> </fixedLineHeight>
  280.         <autoTab> <false /> </autoTab>
  281.         <lockText> <false /> </lockText>
  282.         <rect>
  283.             <left>84</left>
  284.             <top>58</top>
  285.             <right>430</right>
  286.             <bottom>238</bottom>
  287.         </rect>
  288.         <style>scrolling</style>
  289.         <autoSelect> <false /> </autoSelect>
  290.         <showLines> <true /> </showLines>
  291.         <wideMargins> <false /> </wideMargins>
  292.         <multipleLines> <false /> </multipleLines>
  293.         <reservedFamily> 0 </reservedFamily>
  294.         <titleWidth>0</titleWidth>
  295.         <icon>0</icon>
  296.         <textAlign>left</textAlign>
  297.         <font>Geneva</font>
  298.         <textSize>12</textSize>
  299.         <textStyle>plain</textStyle>
  300.         <textHeight>16</textHeight>
  301.         <name>Answers</name>
  302.         <script></script>
  303.     </part>
  304.     <part>
  305.         <id>3</id>
  306.         <type>button</type>
  307.         <visible> <true /> </visible>
  308.         <reserved5> 0 </reserved5>
  309.         <reserved4> 0 </reserved4>
  310.         <reserved3> 0 </reserved3>
  311.         <reserved2> 0 </reserved2>
  312.         <reserved1> 0 </reserved1>
  313.         <enabled> <true /> </enabled>
  314.         <rect>
  315.             <left>180</left>
  316.             <top>260</top>
  317.             <right>338</right>
  318.             <bottom>284</bottom>
  319.         </rect>
  320.         <style>roundrect</style>
  321.         <showName> <true /> </showName>
  322.         <highlight> <false /> </highlight>
  323.         <autoHighlight> <true /> </autoHighlight>
  324.         <sharedHighlight> <true /> </sharedHighlight>
  325.         <family>0</family>
  326.         <titleWidth>0</titleWidth>
  327.         <icon>0</icon>
  328.         <textAlign>center</textAlign>
  329.         <font>Chicago</font>
  330.         <textSize>12</textSize>
  331.         <textStyle>plain</textStyle>
  332.         <name>Back to Explanation</name>
  333.         <script>on mouseUpgo to card id 4857end mouseUp</script>
  334.     </part>
  335.     <content>
  336.         <layer>card</layer>
  337.         <id>1</id>
  338.         <text>1,Answer hazy -- try again later2,Yup -- I think3,Nope -- probably4,Hard to say on this one5,Didn't get it -- ask again6,Wise guy!7,Would you believe 62?8,Could go either way9,Probably -- but not definitely10,Could be11,Might be12,Ask your Ouiji board!13,You might have better luck flipping Tarot cards!14,Better consult the I-Ching15,I'd help if I could... really!</text>
  339.     </content>
  340.     <name></name>
  341.     <script></script>
  342. </card>
  343.  
  344.  
  345.